$(function(){

    $.ajax({
        type:"POST",
        url:"/Store/storeShitiList",
        data:'',
        dataType:"json",
        success:function (data) {
            var LdList = $(data.LdList);
            var LdList2 = $(data.LdList2);
            $(".qianshu").html();
            var money = data.money;
            var Ld =data.Ld;
            var Ld21 =data.Ld21;
            var Ld22 =data.Ld22;
            var cgstr = "";
            var cgstr2 = "";
            var cgstr3 ="";
            var cgstr4 ="";
            var cgstr5 ="";
            LdList.each(function () {
                
                cgstr +="<div class=\"container goods_detailed_news\" data=\"60\">"
                cgstr +="<span style='display: none'>"+this.commodityId+"</span>"
                cgstr += "<div class=\"pic_contain\">"
                cgstr += "<img src=\"/statics/uploadData/membermall/"+this.commodityImg+"\">"
                cgstr += "</div>"
                cgstr += "<p class=\"pic_name\">"+this.commodityName+"</p>"
                cgstr += "<div class=\"pic_introduce\"><span>原价：</span>"
                cgstr += "<div class=\"before_price\">"
                cgstr += "<span>"+this.price+"</span><img src=\"/statics/statics/home2/images/member_mall/member_mall6.png\">"
                cgstr += "<div class=\"heng_solid\"></div>"
                cgstr += "</div>"
                cgstr += "</div>"
                cgstr += "<div class=\"pic_introduce\">"
                cgstr += "<span class=\'vip_name\'>帮主尊享价：</span>"
                cgstr +=  "<span class=\"after_price\">"+this.newprice+"</span><img src=\"/statics/statics/home2/images/member_mall/member_mall2.png\">"
                cgstr +=  "</div>"
                cgstr +=  "<div class=\"pic_introduce\">"
                cgstr +="<span>库存：</span>"
                cgstr += "<span>"+this.commodityCount+"（件）</span>"
                cgstr += "</div>"
                cgstr += "</div>"

            });
            LdList2.each(function () {
                cgstr2 +="<div class=\"container goods_detailed_news\" data=\"61\">"
                cgstr2 +="<span style='display: none'>"+this.commodityId+"</span>"
                cgstr2 += "<div class=\"pic_contain\">"
                cgstr2 += "<img src=\"/statics/uploadData/membermall/"+this.commodityImg+"\">"
                cgstr2 += "</div>"
                cgstr2 += "<p class=\"pic_name\">"+this.commodityName+"</p>"
                cgstr2 += "<div class=\"pic_introduce\"><span>原价：</span>"
                cgstr2 += "<div class=\"before_price\">"
                cgstr2 += "<span>"+this.price+"</span><img src=\"/statics/statics/home2/images/member_mall/member_mall6.png\">"
                cgstr2 += "<div class=\"heng_solid\"></div>"
                cgstr2 += "</div>"
                cgstr2 += "</div>"
                cgstr2 += "<div class=\"pic_introduce\">"
                cgstr2 += "<span class=\'vip_name\'>帮主尊享价：</span>"
                cgstr2 +=  "<span class=\"after_price\">"+this.newprice+"</span><img src=\"/statics/statics/home2/images/member_mall/member_mall2.png\">"
                cgstr2 +=  "</div>"
                cgstr2 +=  "<div class=\"pic_introduce\">"
                cgstr2 +="<span>库存：</span>"
                cgstr2 += "<span>"+this.hBkucun+"（件）</span>"
                cgstr2 += "</div>"
                cgstr2 += "</div>"
            });

            cgstr3 +="<div class=\"container goods_detailed_news\" data=\"60\">"
            cgstr3 +="<span style='display: none'>"+Ld.commodityId+"</span>"
            cgstr3 += "<div class=\"pic_contain\">"
            cgstr3 += "<img src=\"/statics/uploadData/membermall/"+Ld.commodityImg+"\">"
            cgstr3 += "</div>"
            cgstr3 += "<p class=\"pic_name\">"+Ld.commodityName+"</p>"
            cgstr3 += "<div class=\"pic_introduce\"><span>原价：</span>"
            cgstr3 += "<div class=\"before_price\">"
            cgstr3 += "<span>"+Ld.price+"</span><img src=\"/statics/statics/home2/images/member_mall/member_mall6.png\">"
            cgstr3 += "<div class=\"heng_solid\"></div>"
            cgstr3 += "</div>"
            cgstr3 += "</div>"
            cgstr3 += "<div class=\"pic_introduce\">"
            cgstr3 += "<span class=\'vip_name\'>帮主尊享价：</span>"
            cgstr3 +=  "<span class=\"after_price\">"+Ld.newprice+"</span><img src=\"/statics/statics/home2/images/member_mall/member_mall2.png\">"
            cgstr3 +=  "</div>"
            cgstr3 +=  "<div class=\"pic_introduce\">"
            cgstr3 +="<span>库存：</span>"
            cgstr3 += "<span>"+Ld.commodityCount+"（件）</span>"
            cgstr3 += "</div>"
            cgstr3 += "</div>"

            cgstr4 +="<div class=\"container goods_detailed_news\" data=\"60\">"
            cgstr4 +="<span style='display: none'>"+Ld21.commodityId+"</span>"
            cgstr4 += "<div class=\"pic_contain\">"
            cgstr4 += "<img src=\"/statics/uploadData/membermall/"+Ld21.commodityImg+"\">"
            cgstr4 += "</div>"
            cgstr4 += "<p class=\"pic_name\">"+Ld21.commodityName+"</p>"
            cgstr4 += "<div class=\"pic_introduce\"><span>原价：</span>"
            cgstr4 += "<div class=\"before_price\">"
            cgstr4 += "<span>"+Ld21.price+"</span><img src=\"/statics/statics/home2/images/member_mall/member_mall6.png\">"
            cgstr4 += "<div class=\"heng_solid\"></div>"
            cgstr4 += "</div>"
            cgstr4 += "</div>"
            cgstr4 += "<div class=\"pic_introduce\">"
            cgstr4 += "<span class=\'vip_name\'>帮主尊享价：</span>"
            cgstr4 +=  "<span class=\"after_price\">"+Ld21.newprice+"</span><img src=\"/statics/statics/home2/images/member_mall/member_mall2.png\">"
            cgstr4 +=  "</div>"
            cgstr4 +=  "<div class=\"pic_introduce\">"
            cgstr4 +="<span>库存：</span>"
            cgstr4 += "<span>"+Ld21.hBkucun+"（件）</span>"
            cgstr4 += "</div>"
            cgstr4 += "</div>"

            cgstr5 +="<div class=\"container goods_detailed_news\" data=\"60\">"
            cgstr5 +="<span style='display: none'>"+Ld22.commodityId+"</span>"
            cgstr5 += "<div class=\"pic_contain\">"
            cgstr5 += "<img src=\"/statics/uploadData/membermall/"+Ld22.commodityImg+"\">"
            cgstr5 += "</div>"
            cgstr5 += "<p class=\"pic_name\">"+Ld22.commodityName+"</p>"
            cgstr5 += "<div class=\"pic_introduce\"><span>原价：</span>"
            cgstr5 += "<div class=\"before_price\">"
            cgstr5 += "<span>"+Ld22.price+"</span><img src=\"/statics/statics/home2/images/member_mall/member_mall6.png\">"
            cgstr5 += "<div class=\"heng_solid\"></div>"
            cgstr5 += "</div>"
            cgstr5 += "</div>"
            cgstr5 += "<div class=\"pic_introduce\">"
            cgstr5 += "<span class=\'vip_name\'>帮主尊享价：</span>"
            cgstr5 +=  "<span class=\"after_price\">"+Ld22.newprice+"</span><img src=\"/statics/statics/home2/images/member_mall/member_mall2.png\">"
            cgstr5 +=  "</div>"
            cgstr5 +=  "<div class=\"pic_introduce\">"
            cgstr5 +="<span>库存：</span>"
            cgstr5 += "<span>"+Ld22.hBkucun+"（件）</span>"
            cgstr5 += "</div>"
            cgstr5 += "</div>"


            $(".chaoliujianhuo").append(cgstr);
            $(".lcsq").append(cgstr2);
            $(".xiaoaituijian").append(cgstr3);
            $(".xiaoaituijian").append(cgstr4);
            $(".xiaoaituijian").append(cgstr5);
            $(".goods_detailed_news").bind("click",dianji);

        },error:function(e){
            alert("cuowu!!!");
            console.log(e);

        }
    });

  function dianji() {
      var id = $(this).children().eq(0)
      var commodityId =id.html();
      window.location.href="/Store/xiangqing?id="+commodityId;
  }


})


